<div class="admin_form">
<%= form_for(@admin) do |f| %>
  <% if @admin.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@admin.errors.count, "error") %> prohibited this admin from being saved:</h2>

      <ul>
      <% @admin.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <fieldset>
  <legend>输入管理员信息</legend>


 <div>
   <%= f.label :name ,"管理员名"%>:
   <%= f.text_field :name, :size => 40 %>
 </div>
 <div>
   <%= f.label :password, '密码' %>:
   <%= f.password_field :password, :size => 40 %>
 </div>

 <div>
   <%= f.label :password_confirmation, '重复密码' %>:
   <%= f.password_field :password_confirmation, :size => 40 %>
 </div>

 <div>
   <%= f.submit "确定",data: { confirm: "确定提交吗?" } %>
 </div>
  </div>
</fieldset>
  
<% end %>

</div>